package com.gmail.at.dao;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.gmail.at.model.Train;

public interface TrainDAO extends PagingAndSortingRepository<Train, Integer> {

	@Query("select t from Train t where t.trainNumber = :trainNumber")
	public Train findByNumber(@Param("trainNumber") int trainNumber);

}
